home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 83
/
MINAMI83.iso
/
Extra
/
winamp532.exe
/
$R0
/
Winamp Modern
/
scripts
/
mute.maki
(
.txt
)
< prev
next >
Wrap
Winamp Compiled Maki Script
|
2005-09-15
|
4KB
|
128 lines
/* Note: a decompiler is no invitation to steal code.
Please respect the the copyright */
#include "std.mi"
Global Group Group16;
Global ToggleButton ToggleButton17;
Global ToggleButton ToggleButton18;
Global Timer Timer19;
Global Text Text20;
Global Float Float21;
Global Boolean Boolean22;
Global Boolean Boolean23;
Global Layer Layer24;
Global Timer Timer25;
System.onScriptLoaded()
{
Boolean22 = System.getPrivateInt(( "winamp5"), ( "muted"), 0);
Float21 = System.getPrivateInt(( "winamp5"), ( "old_volume"), 0);
Group16 = System.getScriptGroup();
ToggleButton17 = Group16.findObject(( "mute"));
ToggleButton17.setActivated(Boolean22);
Timer25 = ( new Timer);
Timer25.setDelay(5);
Timer25.start();
Text20 = Group16.findObject(( "songticker"));
Layer24 = Group16.findObject(( "volumebar"));
Layer24.setXmlParam(( "w"), System.integerToString(( ( ( System.getVolume() / 255) * 70) + 5)));
Timer19 = ( new Timer);
Timer19.setDelay(1000);
if(Boolean22) {
Timer19.start();
Text20.setText(( "Mute\ ON"));
}
Boolean23 = 0;
return Null;
}
System.onScriptUnloading()
{
System.setPrivateInt(( "winamp5"), ( "muted"), Boolean22);
System.setPrivateInt(( "winamp5"), ( "old_volume"), Float21);
delete Timer25;
return Null;
}
Timer25.onTimer()
{
ToggleButton18 = System.getContainer(( "main")).getLayout(( "shade")).findObject(( "shademute"));
if(( ToggleButton18 != Null)) {
ToggleButton18.setActivated(Boolean22);
Timer25.stop();
}
return Null;
}
Timer19.onTimer()
{
Text20.setText(( ""));
Timer19.stop();
return Null;
}
ToggleButton17.onLeftClick()
{
Boolean23 = 1;
if(( ! Boolean22)) {
Float21 = System.getVolume();
System.setVolume(0);
Boolean22 = 1;
Timer19.start();
Text20.setText(( "Mute\ ON"));
ToggleButton18.setActivated(1);
} else {
System.setVolume(Float21);
Boolean22 = 0;
Timer19.start();
Text20.setText(( "Mute\ OFF"));
ToggleButton18.setActivated(0);
}
return Null;
}
ToggleButton18.onLeftClick()
{
Boolean23 = 1;
if(( ! Boolean22)) {
Float21 = System.getVolume();
System.setVolume(0);
Boolean22 = 1;
Timer19.start();
Text20.setText(( "Mute\ ON"));
ToggleButton17.setActivated(1);
} else {
System.setVolume(Float21);
Boolean22 = 0;
Timer19.start();
Text20.setText(( "Mute\ OFF"));
ToggleButton17.setActivated(0);
}
return Null;
}
System.onScriptUnloading()
{
delete Timer19;
return Null;
}
System.onVolumeChanged(int newvol)
{
Layer24.setXmlParam(( "w"), System.integerToString(( ( ( newvol / 255) * 70) + 5)));
if(( ! Boolean23)) {
Timer19.start();
Text20.setText(( ( ( "Volume\:") + System.integerToString(( newvol / ( 2.54999995231628)))) + ( "\%")));
if(Boolean22) {
ToggleButton17.setActivated(0);
ToggleButton18.setActivated(0);
Boolean22 = 0;
}
}
Boolean23 = 0;
return Null;
}